/*******************************************************************
 *
 * Copyright (C), 2021-2022, LS, All rights reserved.
 *
 * Author      : 
 * Create Time : 2021-09-17
 * Version     : v0.1
 * Description : 
 *******************************************************************/
#ifndef _LS_BLE_FILE_PROTOCOL_H_
#define _LS_BLE_FILE_PROTOCOL_H_
 
/*----------------------------Head file----------------------------*/
#include "stdint.h"
#include "stdbool.h"
#include "ls_ble_sdk_config.h"

/*----------------------------macro file---------------------------*/
#define FILE_PACKET_HEAD_SIZE             7
#define FILE_FIRST_FRAME_DATA_MAX_SIZE    (FILE_RX_PKT_MAX_SIZE - FILE_PACKET_HEAD_SIZE)
#define FILE_REST_FRAME_DATA_MAX_SIZE     (FILE_RX_PKT_MAX_SIZE - 1)

/*----------------------------type define--------------------------*/

/*----------------------------var define---------------------------*/

/*-------------------------func declaration------------------------*/
extern void file_protocol_init(void);
extern bool file_upload_msg(uint8_t cmd, uint8_t *payload, uint16_t payload_len);

/*-----------------------------------------------------------------*/

#endif
